<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>留言框</title>
<style>
.bigbox{
    width: 400px;
    height: 500px;
    margin: auto;
   
}
.box1{
    width: 300px;
    height: 150px;
    margin: auto;
    margin-top: 50px;
}
.box2{
    width: 300px;
    height: 150px;
    margin: auto;
    margin-top: 50px;
}
.box3{
    width: 100px;
    height: 50px;
    margin: auto;
    margin-top: 40px;
    border: 1px,black,solid;
}
body
			{
				background-attachment: fixed;		/* 图片固定 */
				background-position: center;		/* 图片居中 */
				background-image: url("R-C.jpg");
				background-repeat: no-repeat;		/* 图片不重复 */
				background-size: cover;			/* 图片全屏 */
			}
</style>
</head>
<body>
    <h1>留言框</h1>
    <div class="bigbox">
        <div class="box1">
            <textarea name="" id="xs" style="height: 150px; width: 300px;"></textarea>
        </div>
        <div class="box2">
            <textarea name="" id="sr" style="height: 150px; width: 300px;"></textarea>
        </div>
        <div class="box3">
            <button id="tj" style="height: 50px; width: 100px;">提交</button>
        </div>
    </div>

    <script>
        const shuru = document.getElementById('xs');
        const targetText = document.getElementById('sr');
        const transferButton = document.getElementById('tj');
        transferButton.addEventListener('click', function() {
            xs.value += sr.value;
            sr.value = '';
        });</script>
</body>
</html>